package com.core.action;

import org.apache.log4j.Logger;
import org.apache.mina.core.buffer.IoBuffer;
import org.apache.mina.core.session.IoSession;

public abstract class AbstractAction implements IAction{

	// private Logger logger1 = Logger.getLogger(getClass());
	private static Logger logger = Logger.getLogger(AbstractAction.class);


	public void doExecute(IoSession session, IoBuffer buffer) {

		try {
			execute(session, buffer);
		} catch (Exception e) {
			//e.printStackTrace();
			logger.error(e.getMessage(),e);
		}

	}

	protected void execute(IoSession session, IoBuffer buffer) throws Exception{}

}
